package com.dk.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName("tb_cars")
public class TbCars {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "name")
    private String name;

    @TableField(value = "brand")
    private String brand;

    @TableField(value = "title")
    private String title;

    @TableField(value = "price")
    private BigDecimal price;

    @TableField(value = "user_id")
    private Long userId;

    @TableField(value = "starttime")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date starttime;

    @TableField(value = "picture")
    private String picture;

    @TableField(value = "reference_price")
    private BigDecimal referencePrice;

    @TableField(value = "new_price")
    private BigDecimal newPrice;

    @TableField(value = "state")
    private String state;

    @TableField(value = "source")
    private String source;

    @TableField(value = "phone")
    private String phone;
}
